<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>主表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="widtd=device-widtd, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="//at.alicdn.com/t/font_tnyc012u2rlwstt9.css" media="all"/>
    <link rel="stylesheet" href="../css/main.css" media="all"/>
    <link rel="stylesheet" href="../css/zhubiao.css" media="all"/>
</head>
<body class="childrenBody all">
<div id="all">
    <div class="top">
        <button type="button" @click="exports" class="layui-btn layui-btn-normal"><i class="layui-icon">&#xe621;</i>导出
        </button>
        <div class="top_right">
            <!--<div class="layui-input-inline">-->
                <!--<input type="tel" name="phone" placeholder="搜索项目序号、员工编号、费用类型、名称、使用人员" lay-verify="required|phone"-->
                       <!--autocomplete="off" class="layui-input">-->
            <!--</div>-->
            <!--<div>-->
                <!--<button type="button" class="layui-btn layui-btn-normal">搜索</button>-->
            <!--</div>-->
        </div>
    </div>
    <div class="tabs">
        <table class="layui-table" id="zhutab">
            <tr class="gray" style="font-weight: bold">
                <td rowspan="2">科目</td>
                <td>操作</td>
                <td>填报部门</td>
                <td colspan="4">分类</td>
                <td>备注（说明）</td>
            </tr>
            <tr>
                <td></td>
                <td>企业基本利率产值</td>
                <td>合同计价产值</td>
                <td>合同计量产值</td>
                <td>安全文明措施费产值</td>
                <td>溢价产值</td>
                <td></td>
            </tr>
            <tr class="gray">
                <td>产值(不含税)</td>
                <td v-if="u0 == false"><span class="operation" @click="uptData(0)">编辑</span></td>
                <td v-if="u0 == true"><span class="operation" @click="uptSave(0)">保存</span></td>
                <td style="color: red">{{top1}}</td>
                <td style="color: red">{{top2}}</td>
                <td style="color: red">{{top3}}</td>
                <td style="color: red">{{top4}}</td>
                <td style="color: red">{{top5}}</td>
                <td :class="u0==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u0" @blur="upd" style="color: red">{{arr.cz_note}}</td>
            </tr>
            <tr class="">
                <td colspan="5"></td>
                <td>金额（元）</td>
                <td>占比</td>
                <td></td>
            </tr>
            <tr class="gray">
                <td rowspan="12">变动费<br/>(不含税)</td>
                <td v-if="u1 == false"><span class="operation" @click="uptData(1)">编辑</span></td>
                <td v-if="u1 == true"><span class="operation" @click="uptSave(1)">保存</span></td>
                <td>材料部</td>
                <td>直接费</td>
                <td>材料款</td>
                <td>{{aqt1}}</td>
                <td>{{yjt1}}%</td>
                <td :class="u1==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u1" @blur="upd">{{arr.zhi_clnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u2 == false"><span class="operation" @click="uptData(2)">编辑</span></td>
                <td v-if="u2 == true"><span class="operation" @click="uptSave(2)">保存</span></td>
                <td>工程部</td>
                <td>直接费</td>
                <td>机械费</td>
                <td>{{aqt2}}</td>
                <td>{{yjt2}}%</td>
                <td :class="u2==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u2" @blur="upd">{{arr.zhi_jxnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u3 == false"><span class="operation" @click="uptData(3)">编辑</span></td>
                <td v-if="u3 == true"><span class="operation" @click="uptSave(3)">保存</span></td>
                <td>工程部</td>
                <td>直接费</td>
                <td>人工</td>
                <td>{{aqt3}}</td>
                <td>{{yjt3}}%</td>
                <td :class="u3==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u3" @blur="upd">{{arr.zhi_rgnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u4 == false"><span class="operation" @click="uptData(4)">编辑</span></td>
                <td v-if="u4 == true"><span class="operation" @click="uptSave(4)">保存</span></td>
                <td>安全部</td>
                <td>安全文明措施费</td>
                <td>材料</td>
                <td>{{aqt4}}</td>
                <td>{{yjt4}}%</td>
                <td :class="u4==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u4" @blur="upd">{{arr.aqwm_clnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u5 == false"><span class="operation" @click="uptData(5)">编辑</span></td>
                <td v-if="u5 == true"><span class="operation" @click="uptSave(5)">保存</span></td>
                <td>安全部</td>
                <td>安全文明措施费</td>
                <td>人工</td>
                <td>{{aqt5}}</td>
                <td>{{yjt5}}%</td>
                <td :class="u5==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u5" @blur="upd">{{arr.aqwm_rgnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u6 == false"><span class="operation" @click="uptData(6)">编辑</span></td>
                <td v-if="u6 == true"><span class="operation" @click="uptSave(6)">保存</span></td>
                <td>安全部</td>
                <td>安全文明措施费</td>
                <td>机械费</td>
                <td>{{aqt6}}</td>
                <td>{{yjt6}}%</td>
                <td :class="u6==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u6" @blur="upd">{{arr.aqwm_jxnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u7 == false"><span class="operation" @click="uptData(7)">编辑</span></td>
                <td v-if="u7 == true"><span class="operation" @click="uptSave(7)">保存</span></td>
                <td>安全部</td>
                <td>安全文明措施费</td>
                <td>临时设施-材料</td>
                <td>{{aqt7}}</td>
                <td>{{yjt7}}%</td>
                <td :class="u7==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u7" @blur="upd">{{arr.aqwm_lsnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u8 == false"><span class="operation" @click="uptData(8)">编辑</span></td>
                <td v-if="u8 == true"><span class="operation" @click="uptSave(8)">保存</span></td>
                <td>安全部</td>
                <td>安全文明措施费</td>
                <td>文化宣传-材料</td>
                <td>{{aqt8}}</td>
                <td>{{yjt8}}%</td>
                <td :class="u8==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u8" @blur="upd">{{arr.aqwm_whnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u9 == false"><span class="operation" @click="uptData(9)">编辑</span></td>
                <td v-if="u9 == true"><span class="operation" @click="uptSave(9)">保存</span></td>
                <td>工程部</td>
                <td>专项措施费</td>
                <td>材料</td>
                <td>{{aqt9}}</td>
                <td>{{yjt9}}%</td>
                <td :class="u9==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u9" @blur="upd">{{arr.zxcs_clnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u10 == false"><span class="operation" @click="uptData(10)">编辑</span></td>
                <td v-if="u10 == true"><span class="operation" @click="uptSave(10)">保存</span></td>
                <td>工程部</td>
                <td>专项措施费</td>
                <td>人工</td>
                <td>{{aqt10}}</td>
                <td>{{yjt10}}%</td>
                <td :class="u10==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u10" @blur="upd">{{arr.zxcs_rgnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u11 == false"><span class="operation" @click="uptData(11)">编辑</span></td>
                <td v-if="u11 == true"><span class="operation" @click="uptSave(11)">保存</span></td>
                <td>工程部</td>
                <td>专项措施费</td>
                <td>机械费</td>
                <td>{{aqt11}}</td>
                <td>{{yjt11}}%</td>
                <td :class="u11==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u11" @blur="upd">{{arr.zxcs_jxnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u12 == false"><span class="operation" @click="uptData(12)">编辑</span></td>
                <td v-if="u12 == true"><span class="operation" @click="uptSave(12)">保存</span></td>
                <td>财务</td>
                <td>社保费+附加税</td>
                <td>附加税</td>
                <td>{{aqtb1}}</td>
                <td>{{yjtb1}}%</td>
                <td :class="u12==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u12" @blur="upd">{{arr.sbfj_fjnote}}</td>
            </tr>
            <tr class="gray">
                <td></td>
                <td></td>
                <td></td>
                <td>...</td>
                <td></td>
                <td>0.00</td>
                <td>0.00&</td>
                <td></td>
            </tr>
            <tr class="gray">
                <td></td>
                <td></td>
                <td></td>
                <td style="color: blue">小计</td>
                <td></td>
                <td style="color: blue">{{zb1}}</td>
                <td>{{zb2}}%</td>
                <td></td>
            </tr>
            <tr class="gray">
                <td></td>
                <td v-if="u13 == false"><span class="operation" @click="uptData(13)">编辑</span></td>
                <td v-if="u13 == true"><span class="operation" @click="uptSave(13)">保存</span></td>
                <td colspan="3">边界利润</td>
                <td style="color: blue">{{z1}}</td>
                <td>{{z2}}%</td>
                <td :class="u13==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u13" @blur="upd">{{arr.bjlr_note}}</td>
            </tr>
            <tr class="">
                <td rowspan="13">固定费<br/></td>
                <td v-if="u14 == false"><span class="operation" @click="uptData(14)">编辑</span></td>
                <td v-if="u14 == true"><span class="operation" @click="uptSave(14)">保存</span></td>
                <td>财务</td>
                <td>项目管理人员工资</td>
                <td></td>
                <td>{{aqt12}}</td>
                <td>{{yjt12}}%</td>
                <td :class="u14==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u14" @blur="upd">{{arr.xmglry_note}}</td>
            </tr>

            <tr class="gray">
                <td v-if="u15 == false"><span class="operation" @click="uptData(15)">编辑</span></td>
                <td v-if="u15 == true"><span class="operation" @click="uptSave(15)">保存</span></td>
                <td>财务</td>
                <td>社保费+附加税</td>
                <td></td>
                <td>{{aqt13}}</td>
                <td>{{yjt13}}%</td>
                <td :class="u15==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u15" @blur="upd">{{arr.sbfj_note}}</td>
            </tr>
            <tr class="">
                <td v-if="u16 == false"><span class="operation" @click="uptData(16)">编辑</span></td>
                <td v-if="u16 == true"><span class="operation" @click="uptSave(16)">保存</span></td>
                <td>财务</td>
                <td>固定资产摊销</td>
                <td></td>
                <td>{{aqt14}}</td>
                <td>{{yjt14}}%</td>
                <td :class="u16==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u16" @blur="upd">{{arr.gdzc_note}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u17 == false"><span class="operation" @click="uptData(17)">编辑</span></td>
                <td v-if="u17 == true"><span class="operation" @click="uptSave(17)">保存</span></td>
                <td>财务</td>
                <td>其他费用</td>
                <td>办公费</td>
                <td>{{aqt15}}</td>
                <td>{{yjt15}}%</td>
                <td :class="u17==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u17" @blur="upd">{{arr.qt_bgnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u18 == false"><span class="operation" @click="uptData(18)">编辑</span></td>
                <td v-if="u18 == true"><span class="operation" @click="uptSave(18)">保存</span></td>
                <td>财务</td>
                <td>其他费用</td>
                <td>差旅费</td>
                <td>{{aqt16}}</td>
                <td>{{yjt16}}%</td>
                <td :class="u18==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u18" @blur="upd">{{arr.qt_clnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u19 == false"><span class="operation" @click="uptData(19)">编辑</span></td>
                <td v-if="u19 == true"><span class="operation" @click="uptSave(19)">保存</span></td>
                <td>财务</td>
                <td>其他费用</td>
                <td>车辆使用费</td>
                <td>{{aqt17}}</td>
                <td>{{yjt17}}%</td>
                <td :class="u19==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u19" @blur="upd">{{arr.qt_clsynote}}</td>
            </tr>
            <tr class="">
                <td v-if="u20 == false"><span class="operation" @click="uptData(20)">编辑</span></td>
                <td v-if="u20 == true"><span class="operation" @click="uptSave(20)">保存</span></td>
                <td>财务</td>
                <td>其他费用</td>
                <td>其他</td>
                <td>{{aqt18}}</td>
                <td>{{yjt18}}%</td>
                <td :class="u20==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u20" @blur="upd">{{arr.qt_qtnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u21 == false"><span class="operation" @click="uptData(21)">编辑</span></td>
                <td v-if="u21 == true"><span class="operation" @click="uptSave(21)">保存</span></td>
                <td>项目负责人</td>
                <td>经营管理费</td>
                <td>1P</td>
                <td>{{aqt19}}</td>
                <td>{{yjt19}}%</td>
                <td :class="u21==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u21" @blur="upd">{{arr.jygl_1Pnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u22 == false"><span class="operation" @click="uptData(22)">编辑</span></td>
                <td v-if="u22 == true"><span class="operation" @click="uptSave(22)">保存</span></td>
                <td>项目负责人</td>
                <td>经营管理费</td>
                <td>2P</td>
                <td>{{aqt20}}</td>
                <td>{{yjt20}}%</td>
                <td :class="u22==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u22" @blur="upd">{{arr.jygl_2Pnote}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u23 == false"><span class="operation" @click="uptData(23)">编辑</span></td>
                <td v-if="u23 == true"><span class="operation" @click="uptSave(23)">保存</span></td>
                <td>项目负责人</td>
                <td>经营管理费</td>
                <td>3P</td>
                <td>{{aqt21}}</td>
                <td>{{yjt21}}%</td>
                <td :class="u23==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u23" @blur="upd">{{arr.jygl_3Pnote}}</td>
            </tr>
            <tr class="">
                <td v-if="u24 == false"><span class="operation" @click="uptData(24)">编辑</span></td>
                <td v-if="u24 == true"><span class="operation" @click="uptSave(24)">保存</span></td>
                <td>项目负责人</td>
                <td>经营管理费</td>
                <td>4P</td>
                <td>{{aqt22}}</td>
                <td>{{yjt22}}%</td>
                <td :class="u24==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u24" @blur="upd">{{arr.jygl_4Pnote}}</td>
            </tr>
            <tr class="gray">
                <td></td>
                <td></td>
                <td>...</td>
                <td></td>
                <td>0.00</td>
                <td>0.00&</td>
                <td></td>
            </tr>
            <tr class="">
                <td></td>
                <td></td>
                <td>小计</td>
                <td></td>
                <td style="color: blue">{{aqt23}}</td>
                <td>{{yjt23}}%</td>
                <td></td>
            </tr>
            <tr class="gray">
                <td></td>
                <td v-if="u25 == false"><span class="operation" @click="uptData(25)">编辑</span></td>
                <td v-if="u25 == true"><span class="operation" @click="uptSave(25)">保存</span></td>
                <td colspan="3">经营利润</td>
                <td style="color: blue">{{aqt24}}</td>
                <td>{{yjt24}}%</td>
                <td :class="u25==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u25" @blur="upd">{{arr.jylr_note}}</td>
            </tr>
            <tr class="">
                <td></td>
                <td v-if="u26 == false"><span class="operation" @click="uptData(26)">编辑</span></td>
                <td v-if="u26 == true"><span class="operation" @click="uptSave(26)">保存</span></td>
                <td colspan="3">管理人员人数(系数)</td>
                <td colspan="2" style="color: red">{{z3}}</td>
                <td :class="u26==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u26" @blur="upd">{{arr.gliyrs_note}}</td>
            </tr>
            <tr class="gray">
                <td></td>
                <td v-if="u27 == false"><span class="operation" @click="uptData(27)">编辑</span></td>
                <td v-if="u27 == true"><span class="operation" @click="uptSave(27)">保存</span></td>
                <td colspan="3">人.日劳动生产力</td>
                <td colspan="2" style="color: red">{{z4}}</td>
                <td :class="u29==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u27" @blur="upd">{{arr.rrldscl_note}}</td>
            </tr>
            <tr class="">
                <td rowspan="3">进、出项费</td>
                <td v-if="u28 == false"><span class="operation" @click="uptData(28)">编辑</span></td>
                <td v-if="u28 == true"><span class="operation" @click="uptSave(28)">保存</span></td>
                <td colspan="3">出项税</td>
                <td>{{z5}}</td>
                <td></td>
                <td :class="u28==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u28" @blur="upd">{{arr.cxs_note}}</td>
            </tr>
            <tr class="gray">
                <td v-if="u29 == false"><span class="operation" @click="uptData(29)">编辑</span></td>
                <td v-if="u29 == true"><span class="operation" @click="uptSave(29)">保存</span></td>
                <td colspan="3">进项税</td>
                <td>{{z6}}</td>
                <td></td>
                <td :class="u29==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u29" @blur="upd">{{arr.jxs_note}}</td>
            </tr>
            <tr class="">
                <td v-if="u30 == false"><span class="operation" @click="uptData(30)">编辑</span></td>
                <td v-if="u30 == true"><span class="operation" @click="uptSave(30)">保存</span></td>
                <td colspan="3">税差</td>
                <td>{{z7}}</td>
                <td></td>
                <td :class="u30==true ? 'addStyle':'addStyle2'" v-bind:contentEditable="u30" @blur="upd">{{arr.sc_note}}</td>
            </tr>
        </table>
    </div>
    <div id="demo0"></div>
</div>
<script type="text/javascript" src="../js/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript" src="../layui/layui.all.js"></script>
<script type="text/javascript" src="../js/main.js"></script>
<!--<script type="text/javascript" src="../js/.js"></script>-->
<script type="text/javascript" src="../js/common.js"></script>
<script>
    var vm = new Vue({
        el: '#all',
        data: {
            project_id: sessionStorage.getItem('projectopt'),
            arr:[],
            aqt1: '',
            yjt1: '',
            aqt2: '',
            yjt2: '',
            aqt3: '',
            yjt3: '',
            aqt4: '',
            yjt4: '',
            aqt5: '',
            yjt5: '',
            aqt6: '',
            yjt6: '',
            aqt7: '',
            yjt7: '',
            aqt8: '',
            yjt8: '',
            aqt9: '',
            yjt9: '',
            aqt10: '',
            yjt10: '',
            aqt11: '',
            yjt11: '',
            aqt12: '',
            yjt12: '',
            aqt13: '',
            yjt13: '',
            aqt14: '',
            yjt14: '',
            aqt15: '',
            yjt15: '',
            aqt16: '',
            yjt16: '',
            aqt17: '',
            yjt17: '',
            aqt18: '',
            yjt18: '',
            aqt19: '',
            yjt19: '',
            aqt20: '',
            yjt20: '',
            aqt21: '',
            yjt21: '',
            aqt22: '',
            yjt22: '',
            aqt23: '',
            yjt23: '',
            aqt24: '',
            yjt24: '',
            top1: '',
            top2: '',
            top3: '',
            top4: '',
            top5: '',
            aqtb1: '',
            yjtb1: '',
            zb1: '',
            zb2: '',
            z1: '',
            z2: '',
            z3: '',
            z4: '',
            z5: '',
            z6: '',
            z7: '',
            u0:false,
            u1:false,
            u2:false,
            u3:false,
            u4:false,
            u5:false,
            u6:false,
            u7:false,
            u8:false,
            u9:false,
            u10:false,
            u11:false,
            u12:false,
            u13:false,
            u14:false,
            u15:false,
            u16:false,
            u17:false,
            u18:false,
            u19:false,
            u20:false,
            u21:false,
            u22:false,
            u23:false,
            u24:false,
            u25:false,
            u26:false,
            u27:false,
            u28:false,
            u29:false,
            u30:false,
            notes:'',
            stus:1,
            permissions:''//权限标识
        },
        created: function () {
            this.initData();
        },
        methods: {
            //初始化数据
            initData: function () {
                if(this.project_id == undefined || this.project_id == null){
                    var obj ={
                        page: 1,
                        limit: 99
                    }
                    //项目
                    $.when(PUATTRBUTE.REQUESTFUN('api/index/projectindex', obj).done(function (res){
                            if(res.code == 1){
                                sessionStorage.setItem('project', JSON.stringify(res.data.project)); //项目集合
                                sessionStorage.setItem('projectopt', res.data.project[0].id) //当前选择项目 默认第一个
                                vm.project_id = res.data.project[0].id;
                                vm.requestdata();
                            }else{
                                if(res.msg == "暂无权限"){
                                    vm.permissions= 1 ;
                                }
                                layer.msg(res.msg, {time: 1000, icon: 2})
                            }
                        })
                    )
                }else{
                    this.requestdata();
                }
            },
            //加载数据
            requestdata: function(){
                var obj = {
                    project_id: this.project_id
                }
                var load = layer.load(2, {
                    shade: [0.6, '#fff'] //0.1透明度的白色背景
                })
                $.when(PUATTRBUTE.REQUESTFUN('api/Statistics/zhuindex', obj).done(function (res) {
                        layer.close(load);
                        if (res.code == 1) {
                            vm.arr = res.data;
                            vm.top1 = PUATTRBUTE.CHANGETWO(res.data.qiye_jiben);
                            vm.top2 = PUATTRBUTE.CHANGETWO(res.data.ht_jijia);
                            vm.top3 = PUATTRBUTE.CHANGETWO(res.data.ht_jiliang);
                            vm.top4 = PUATTRBUTE.CHANGETWO(res.data.anquan_total);
                            vm.top5 = PUATTRBUTE.CHANGETWO(res.data.yijia);
                            //中部
                            vm.aqt1 = PUATTRBUTE.CHANGETWO(res.data.zhi_cai_money);
                            vm.yjt1 = PUATTRBUTE.CHANGETWO(res.data.zhi_cai_fee);
                            vm.aqt2 = PUATTRBUTE.CHANGETWO(res.data.zhi_jixie_money);
                            vm.yjt2 = PUATTRBUTE.CHANGETWO(res.data.zhi_jixie_fee);
                            vm.aqt3 = PUATTRBUTE.CHANGETWO(res.data.zhi_ren_money);
                            vm.yjt3 = PUATTRBUTE.CHANGETWO(res.data.zhi_ren_fee);
                            vm.aqt4 = PUATTRBUTE.CHANGETWO(res.data.an_cai_money);
                            vm.yjt4 = PUATTRBUTE.CHANGETWO(res.data.an_cai_fee);
                            vm.aqt5 = PUATTRBUTE.CHANGETWO(res.data.an_ren_money);
                            vm.yjt5 = PUATTRBUTE.CHANGETWO(res.data.an_ren_fee);
                            vm.aqt6 = PUATTRBUTE.CHANGETWO(res.data.an_jixie_money);
                            vm.yjt6 = PUATTRBUTE.CHANGETWO(res.data.an_jixie_fee);
                            vm.aqt7 = PUATTRBUTE.CHANGETWO(res.data.an_lin_money);
                            vm.yjt7 = PUATTRBUTE.CHANGETWO(res.data.an_lin_fee);
                            vm.aqt8 = PUATTRBUTE.CHANGETWO(res.data.an_wen_money);
                            vm.yjt8 = PUATTRBUTE.CHANGETWO(res.data.an_wen_fee);
                            vm.aqt9 = PUATTRBUTE.CHANGETWO(res.data.zhuan_cai_money);
                            vm.yjt9 = PUATTRBUTE.CHANGETWO(res.data.zhuan_cai_fee);
                            vm.aqt10 = PUATTRBUTE.CHANGETWO(res.data.zhuan_ren_money);
                            vm.yjt10 = PUATTRBUTE.CHANGETWO(res.data.zhuan_ren_fee);
                            vm.aqt11 = PUATTRBUTE.CHANGETWO(res.data.zhuan_jixie_money);
                            vm.yjt11 = PUATTRBUTE.CHANGETWO(res.data.zhuan_jixie_fee);
                            vm.aqtb1 = PUATTRBUTE.CHANGETWO(res.data.fujia_money);
                            vm.yjtb1 = PUATTRBUTE.CHANGETWO(res.data.fujia_fee);
                            vm.zb1 = PUATTRBUTE.CHANGETWO(res.data.bian_total);
                            vm.zb2 = PUATTRBUTE.CHANGETWO(res.data.bian_fee);
                            vm.z1 = PUATTRBUTE.CHANGETWO(res.data.bianjie_money);
                            vm.z2 = PUATTRBUTE.CHANGETWO(res.data.bianjie_fee);
                            vm.aqt12 = PUATTRBUTE.CHANGETWO(res.data.xiangmu_money);
                            vm.yjt12 = PUATTRBUTE.CHANGETWO(res.data.xiangmu_fee);
                            vm.aqt13 = PUATTRBUTE.CHANGETWO(res.data.shebao_money);
                            vm.yjt13 = PUATTRBUTE.CHANGETWO(res.data.shebao_fee);
                            vm.aqt14 = PUATTRBUTE.CHANGETWO(res.data.fixed_money);
                            vm.yjt14 = PUATTRBUTE.CHANGETWO(res.data.fixed_fee);
                            vm.aqt15 = PUATTRBUTE.CHANGETWO(res.data.other_bangong);
                            vm.yjt15 = PUATTRBUTE.CHANGETWO(res.data.other_bangong_fee);
                            vm.aqt16 = PUATTRBUTE.CHANGETWO(res.data.other_chailv);
                            vm.yjt16 = PUATTRBUTE.CHANGETWO(res.data.other_chailv_fee);
                            vm.aqt17 = PUATTRBUTE.CHANGETWO(res.data.other_che);
                            vm.yjt17 = PUATTRBUTE.CHANGETWO(res.data.other_che_fee);
                            vm.aqt18 = PUATTRBUTE.CHANGETWO(res.data.other_other);
                            vm.yjt18 = PUATTRBUTE.CHANGETWO(res.data.other_other_fee);
                            vm.aqt19 = PUATTRBUTE.CHANGETWO(res.data.business_one);
                            vm.yjt19 = PUATTRBUTE.CHANGETWO(res.data.business_one_fee);
                            vm.aqt20 = PUATTRBUTE.CHANGETWO(res.data.business_two);
                            vm.yjt20 = PUATTRBUTE.CHANGETWO(res.data.business_two_fee);
                            vm.aqt21 = PUATTRBUTE.CHANGETWO(res.data.business_three);
                            vm.yjt21 = PUATTRBUTE.CHANGETWO(res.data.business_three_fee);
                            vm.aqt22 = PUATTRBUTE.CHANGETWO(res.data.business_four);
                            vm.yjt22 = PUATTRBUTE.CHANGETWO(res.data.business_four_fee);
                            vm.aqt23 = PUATTRBUTE.CHANGETWO(res.data.gu_total);
                            vm.yjt23 = PUATTRBUTE.CHANGETWO(res.data.gu_total_fee);
                            vm.aqt24 = PUATTRBUTE.CHANGETWO(res.data.jingying_money);
                            vm.yjt24 = PUATTRBUTE.CHANGETWO(res.data.jingying_fee);
                            //底部
                            vm.z3 = PUATTRBUTE.CHANGETWO(res.data.guanli_num);
                            vm.z4 = PUATTRBUTE.CHANGETWO(res.data.people_day_money);
                            vm.z5 = PUATTRBUTE.CHANGETWO(res.data.chu_shui_money);
                            vm.z6 = PUATTRBUTE.CHANGETWO(res.data.jin_shui_money);
                            vm.z7 = PUATTRBUTE.CHANGETWO(res.data.shui_cha);
                        } else {
                            layer.msg(res.msg, {time: 1000, icon: 2})
                        }
                    })
                )
            },
            //修改
            uptData:function (ub) {
                if (this.stus == 1){
                    console.log(this.stus);
                    if(ub == 0){
                        vm.u0 = true;
                    }else if(ub == 1){
                        vm.u1 = true;
                    }else if(ub == 2){
                        vm.u2 = true;
                    }else if(ub == 3){
                        vm.u3 = true;
                    }else if(ub == 4){
                        vm.u4 = true;
                    }else if(ub == 5){
                        vm.u5 = true;
                    }else if(ub == 6){
                        vm.u6 = true;
                    }else if(ub == 7){
                        vm.u7 = true;
                    }else if(ub == 8){
                        vm.u8 = true;
                    }else if(ub == 9){
                        vm.u9 = true;
                    }else if(ub == 10){
                        vm.u10 = true;
                    }else if(ub == 11){
                        vm.u11 = true;
                    }else if(ub == 12){
                        vm.u12 = true;
                    }else if(ub == 13){
                        vm.u13 = true;
                    }else if(ub == 14){
                        vm.u14 = true;
                    }else if(ub == 15){
                        vm.u15 = true;
                    }else if(ub == 16){
                        vm.u16 = true;
                    }else if(ub == 17){
                        vm.u17 = true;
                    }else if(ub == 18){
                        vm.u18 = true;
                    }else if(ub == 19){
                        vm.u19 = true;
                    }else if(ub == 20){
                        vm.u20 = true;
                    }else if(ub == 21){
                        vm.u21 = true;
                    }else if(ub == 22){
                        vm.u22 = true;
                    }else if(ub == 23){
                        vm.u23 = true;
                    }else if(ub == 24){
                        vm.u24 = true;
                    }else if(ub == 25){
                        vm.u25 = true;
                    }else if(ub == 26){
                        vm.u26 = true;
                    }else if(ub == 27){
                        vm.u27 = true;
                    }else if(ub == 28){
                        vm.u28 = true;
                    }else if(ub == 29){
                        vm.u29 = true;
                    }else if(ub == 30){
                        vm.u30 = true;
                    }
                    this.stus = 2;
                    console.log(this.stus)
                }else if(this.stus == 2){
                    layer.alert('请先保存');
                    return false;
                }
            },
            upd:function (data) {
                vm.notes = data.target.innerText;
            },
            uptSave:function (up) {
                this.stus = 1;
                var obj = {
                    project_id : vm.project_id
                }
                if(up == 0){
                    obj.cz_note = vm.notes;
                    vm.u0 = false;
                }else if(up == 1){
                    obj.zhi_clnote = vm.notes;
                    vm.u1 = false;
                }else if(up == 2){
                    obj.zhi_jxnote = vm.notes;
                    vm.u2 = false;
                }else if(up == 3){
                    obj.zhi_rgnote = vm.notes;
                    vm.u3 = false;
                }else if(up == 4){
                    obj.aqwm_clnote = vm.notes;
                    vm.u4 = false;
                }else if(up == 5){
                    obj.aqwm_rgnote = vm.notes;
                    vm.u5 = false;
                }else if(up == 6){
                    obj.aqwm_jxnote = vm.notes;
                    vm.u6 = false;
                }else if(up == 7){
                    obj.aqwm_lsnote = vm.notes;
                    vm.u7 = false;
                }else if(up == 8){
                    obj.aqwm_whnote = vm.notes;
                    vm.u8 = false;
                }else if(up == 9){
                    obj.zxcs_clnote = vm.notes;
                    vm.u9 = false;
                }else if(up == 10){
                    obj.zxcs_rgnote = vm.notes;
                    vm.u10 = false;
                }else if(up == 11){
                    obj.zxcs_jxnote = vm.notes;
                    vm.u11 = false;
                }else if(up == 12){
                    obj.sbfj_fjnote = vm.notes;
                    vm.u12 = false;
                }else if(up == 13){
                    obj.bjlr_note = vm.notes;
                    vm.u13 = false;
                }else if(up == 14){
                    obj.xmglry_note = vm.notes;
                    vm.u14 = false;
                }else if(up == 15){
                    obj.sbfj_note = vm.notes;
                    vm.u15 = false;
                }else if(up == 16){
                    obj.gdzc_note = vm.notes;
                    vm.u16 = false;
                }else if(up == 17){
                    obj.qt_bgnote = vm.notes;
                    vm.u17 = false;
                }else if(up == 18){
                    obj.qt_clnote = vm.notes;
                    vm.u18 = false;
                }else if(up == 19){
                    obj.qt_clsynote = vm.notes;
                    vm.u19 = false;
                }else if(up == 20){
                    obj.qt_qtnote = vm.notes;
                    vm.u20 = false;
                }else if(up == 21){
                    obj.jygl_1Pnote = vm.notes;
                    vm.u21 = false;
                }else if(up == 22){
                    obj.jygl_2Pnote = vm.notes;
                    vm.u22 = false;
                }else if(up == 23){
                    obj.jygl_3Pnote = vm.notes;
                    vm.u23 = false;
                }else if(up == 24){
                    obj.jygl_4Pnote = vm.notes;
                    vm.u24 = false;
                }else if(up == 25){
                    obj.jylr_note = vm.notes;
                    vm.u25 = false;
                }else if(up == 26){
                    obj.gliyrs_note = vm.notes;
                    vm.u26 = false;
                }else if(up == 27){
                    obj.rrldscl_note = vm.notes;
                    vm.u27 = false;
                }else if(up == 28){
                    obj.cxs_note = vm.notes;
                    vm.u28 = false;
                }else if(up == 29){
                    obj.jxs_note = vm.notes;
                    vm.u29 = false;
                }else if(up == 30){
                    obj.sc_note = vm.notes;
                    vm.u30 = false;
                }
                var load = layer.load(2, {
                    shade: [0.6, '#fff'] //0.1透明度的白色背景
                });
                $.when(PUATTRBUTE.REQUESTFUN('/api/Statistics/zhuedit', obj).done(function(res){
                        layer.close(load);
                        if(res.code == 1){
                            layer.msg(res.msg, {time: 1000, icon: 1})
                        }else{
                            layer.msg(res.msg, {time: 1000, icon: 2})
                        }
                    })
                )
            },
            //导出
            exports: function () {
                if(this.permissions == 1){
                    layer.alert("抱歉，您没有此权限！");
                }else {
                    var tableHtml = $('#zhutab');
                    $(tableHtml).css({
                        'border':'1px solid #d5d5d2',
                        'text-align':'center',
                        'border-collapse':'collapse',
                    });
                    $(tableHtml).find('tr td').css({
                        'text-align':'center',
                        'border':'1px solid #d5d5d2',
                        'line-height':'30px',
                        'padding':'0px 10px',
                        'min-width':'100px'
                    });
                    var html = "<html><head><meta charset='utf-8' /></head><body>" + tableHtml[0].outerHTML + "</body></html>";
// 实例化一个Blob对象，其构造函数的第一个参数是包含文件内容的数组，第二个参数是包含文件类型属性的对象
                    var blob = new Blob([html], { type: "application/vnd.ms-excel" });
                    var urlA = document.createElement('a');
// 利用URL.createObjectURL()方法为a元素生成blob URL
                    $('.table-btn-group').append(urlA);
                    urlA.href = URL.createObjectURL(blob);
// 设置文件名，目前只有Chrome和FireFox支持此属性
                    urlA.download = "主表信息.xls";
                    urlA.click();
                }
            }
        }
    })
</script>
</body>
</html>
